$primary-color: blue;
$size: 10px;
*{
    box-sizing: border-box;
}
body{
    // box-sizing: border-box;
    // box-sizing: content-box;
    width: 50%;
    text-align: center;
}

content{
    width: 600px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    .box{
        background-color: green;
        position: relative;
        width: 240px;
        // width: 60px;
        padding: 20px;
        margin: 10px 0;
        box-shadow: 0 0 0 rgb(0, 0, 0, 0.2);
    }
    @mixin arrow($color, $direction, $size: 10px){
        content: '';
        position: absolute;
        display: block;
        width: 0;
        height: 0;
        @if $direction == top or $direction == bottom{
            border-left: $size solid transparent;
            border-right: $size solid transparent;
            left: calc(50% - #{$size});
            @if $direction == top{
                border-bottom: $size solid $color;
                top: -($size)
            }
            @if $direction == bottom{
                border-top: $size solid $color;
                bottom: -($size);
            }
        }
        @if $direction == left or $direction == right{
            border-top: $size solid transparent;
            border-bottom: $size solid transparent;
            top: calc(50% - #{$size});;
            @if $direction == left{
                border-right: $size solid $color;
                left: -($size);
            }
            @if $direction == right{
                border-left: $size solid $color;
                right: -($size);
            }
        }
    }
    .right::after{
        @include arrow($primary-color, right)
    }
    .left::after{
        @include arrow($primary-color, left)
    }
    .bottom::after{
        @include arrow($primary-color, bottom)
    }

    .top::after{
        @include arrow($primary-color, top)
    }


}

    
    
    
    
